home *** CD-ROM | disk | FTP | other *** search
Makefile | 1995-05-03 | 3.2 KB | 122 lines |
- DESTDIR=/usr/skunk
- # makefile for shar
- #
- # $Header: /u/rhg/src/shar/Makefile,v 3.49 90/09/12 15:14:18 rhg Exp $
- #
- #+:EDITS:
- #:09-09-1990-20:12-rhg@cps.com-added CLOSEDIR_VOID
- #:09-09-1990-11:31-bill@netagw.com-add SHELL variable/-ldir for XENIX/UNIX 386
- #:08-07-1990-21:25-rhg@cps.com-compress man pages if MANEXT ends with .Z
- #:08-05-1990-23:50-rhg@cps.com-add post and compressed.
- #:08-05-1990-12:19-rhg@cps.com-add LIBS and -ldirent
- #:08-04-1990-18:51-rhg@cps.com-add CC, LD; move strip; reorder chgrp/chown.
- #:05-14-1990-17:33-wht@n4hgf-add -F 5000 for XENIX 286
- #:05-14-1990-17:32-bill@netagw.com-expanded Makefile
- #:03-28-1990-14:54-wht@n4hgf-for 3.10, add who@where.c
-
- SHELL=/bin/sh
-
- BINDIR = $(DESTDIR)/bin
- OWNER = bin
- GROUP = bin
- BINMODE = 0755
- MANDIR = $(DESTDIR)/man/man.1
- MANEXT = 1
- MANOWN = bin
- MANGRP = bin
- MANMODE = 0644
-
- CC = cc
- LD = ${CC}
-
- # If you don't have Doug Gwyn's dirent routines or equivalent, then remove
- # -ldirent from LIBS and add -DNO_WALKTREE to CFLAGS. All you will give up
- # is the ability to shar directorys without using "find ... -type f | shar -S".
- # Note that many systems have the equivalent of the dirent library built into
- # the standard C library. For such systems, just remove -ldirent from LIBS.
- # (note by RHG@CPS.COM: I don't know which systems listed below are like that.)
- # Some systems, such as SCO XENIX/UNIX 386 use -ldir instead.
- # Some systems, such as SunOS 3, use <sys/dir.h> instead of <dirent.h>. For
- # these systems, add -DNO_DIRENT to CFLAGS. Many of these same systems, such
- # as BSD, have a closedir that has no return value. For these systems, add
- # both -DNO_DIRENT and -DCLOSEDIR_VOID to CFLAGS.
-
- # For VAX, PYRAMID, SEQUENT, AT&T 3B1/7300
- #CFLAGS = -O
- #LDFLAGS =
- #LIBS = -ldirent
-
- # For SUN
- #CFLAGS = -O -DNO_DIRENT -DCLOSEDIR_VOID
- #LDFLAGS =
- #LIBS =
-
- # For SCO XENIX/UNIX 386
- CFLAGS = -O -DCLOSEDIR_VOID
- LDFLAGS =
- LIBS = -lsocket -lmalloc -lc_s
-
- # For SCO XENIX 286
- #CFLAGS = -O
- #LDFLAGS = -F 5000
- #LIBS = -ldirent
-
- # For other System V systems I did not catch
- #CFLAGS = -O -DSYS5
- #LDFLAGS =
- #LIBS = -ldirent
-
- # For BSD-like systems
- #CFLAGS = -O -DBSD42 -DNO_DIRENT -DCLOSEDIR_VOID
- #LDFLAGS =
- #LIBS =
-
- SOURCES = README Makefile shar.1 unshar.1 uushar.c who@where.c unshar.c shar.c
-
- SHAR = shar.o uushar.o who@where.o
- UNSHAR = unshar.o
-
- all: shar unshar
-
- shar: ${SHAR}
- ${LD} ${LDFLAGS} ${SHAR} ${LIBS} -o shar
-
- unshar : ${UNSHAR}
- ${LD} ${LDFLAGS} ${UNSHAR} ${LIBS} -o unshar
-
- shar.o : shar.c
- ${CC} ${CFLAGS} -c shar.c
-
- unshar.o : unshar.c
- ${CC} ${CFLAGS} -c unshar.c
-
- uushar.o : uushar.c
- ${CC} ${CFLAGS} -c uushar.c
-
- who@where.o : who@where.c
- ${CC} ${CFLAGS} -c who@where.c
-
- install : shar unshar inst-man
- scoinst shar ${BINDIR}
- scoinst unshar ${BINDIR}
-
- inst-man:
- scoinst shar.1 ${MANDIR}/shar.${MANEXT}
- scoinst unshar.1 ${MANDIR}/unshar.${MANEXT}
-
- clean clobber:
- rm -f shar unshar *.o core
-
- SETV = X="`head -1 shar.c`"; \
- V=`expr "$$X" : 'char \*revision = "\([1-9][0-9]*\.[0-9.a-zA-Z]*\)";$$'`;
-
- post : ${SOURCES}
- ${SETV} test -n "$$V" && ( \
- rm -f shar$$V.[0-9][0-9]; \
- shar -l50 -acF -n "shar$$V" -o "shar$$V" ${SOURCES} )
-
- compressed : ${SOURCES}
- ${SETV} test -n "$$V" && \
- shar -acFm -b16 -n "shar$$V" > "shar$$V" ${SOURCES}
-
-